package com.yonyou.cyxdms.sysAuth.service.entity.notification;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 通知通告之经销商
 * </p>
 *
 * @author adu
 * @since 2019-10-14
 */
@TableName("tt_notification_dealer")
public class NotificationDealerPO extends DMSBasePO<NotificationDealerPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 通知通告之经销商ID
     */
    @TableId(value = "NOTIFICATION_DEALER_ID", type = IdType.AUTO)
    private Long notificationDealerId;

    /**
     * APP_ID
     */
    @TableField(value = "APP_ID")
    private String appId;

    /**
     * 通知通告ID
     */
    @TableField("NOTIFICATION_ID")
    private Long notificationId;

    /**
     * 经销商ID
     */
    @TableField("DEALER_ID")
    private Long dealerId;

    /**
     * 经销商名称
     */
    @TableField("DEALER_NAME")
    private String dealerName;

    /**
     * 所有者代码(经销商代码)
     */
    @TableField("OWNER_CODE")
    private String ownerCode;

    /**
     * 经销商公司ID
     */
    @TableField("DEALER_COMPANY_ID")
    private Long dealerCompanyId;

    /**
     * 是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;
    /**
     * 所属区域
     */
    @TableField(value = "ORG_NAME", exist = false)
    private String saleArea;

    public NotificationDealerPO() {
        super();
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getNotificationDealerId() {
        return notificationDealerId;
    }

    public void setNotificationDealerId(Long notificationDealerId) {
        this.notificationDealerId = notificationDealerId;
    }

    public Long getNotificationId() {
        return notificationId;
    }

    public void setNotificationId(Long notificationId) {
        this.notificationId = notificationId;
    }

    public Long getDealerId() {
        return dealerId;
    }

    public void setDealerId(Long dealerId) {
        this.dealerId = dealerId;
    }

    public String getDealerName() {
        return dealerName;
    }

    public void setDealerName(String dealerName) {
        this.dealerName = dealerName;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public Long getDealerCompanyId() {
        return dealerCompanyId;
    }

    public void setDealerCompanyId(Long dealerCompanyId) {
        this.dealerCompanyId = dealerCompanyId;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    @Override
    protected Serializable pkVal() {
        return this.notificationDealerId;
    }

    @Override
    public String toString() {
        return "NotificationDealerPO{" +
                "notificationDealerId=" + notificationDealerId +
                ", appId='" + appId + '\'' +
                ", notificationId=" + notificationId +
                ", dealerId=" + dealerId +
                ", dealerName='" + dealerName + '\'' +
                ", ownerCode='" + ownerCode + '\'' +
                ", dealerCompanyId=" + dealerCompanyId +
                ", isDeleted=" + isDeleted +
                ", saleArea='" + saleArea + '\'' +
                '}';
    }

    public String getSaleArea() {
        return saleArea;
    }

    public void setSaleArea(String saleArea) {
        this.saleArea = saleArea;
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author chengliang
     * @since 2019-09-24
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "notificationDealerId");
    }


}
